<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <%--<link rel="stylesheet" href="${ctx}/libjs/plugins/h-ui/css/H-ui.min.css">--%>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/h-ui/css/H-ui.admin.css">
    <link rel="stylesheet" href="${ctx}/libjs/plugins/h-ui/style.css">
    <%--<script src="${ctx}/libjs/jquery.min.js"></script>--%>
    <%--<script src="${ctx}/libjs/bootstrap.js"></script>--%>
    <script type="text/javascript"
            src="https://webapi.amap.com/maps?v=1.3&key=e392de55be62b195115e32b97043a1bd&plugin=AMap.Autocomplete,AMap.PlaceSearch"></script>
    <script type="text/javascript" src="${ctx}/appjs/car/tenantCarNumber.js"></script>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return '<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>车辆管理</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>车辆列表</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });
</script>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <div class="columns pull-left">
                        <h5 class="font-bold">新增车辆</h5>
                    </div>
                    <div class="ibox-tools">
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>

                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="frmTenantCarNumer">
                        <input type="hidden" class="form-control" id="memberId" name="memberId" readonly>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">所属企业：</label>
                            <div class="col-sm-8">
                                <select id="enterpriseMemberId" name="enterpriseMemberId" class="form-control" placeholder="所属企业">
                                    <option value="" selected="selected">请选择</option>
                                    <c:forEach items="${enterpriseMembers}" var="enterpriseMemberInfo">
                                        <option value="${enterpriseMemberInfo.enterpriseId}">${enterpriseMemberInfo.enterpriseName}
                                        </option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">车辆品牌：</label>
                            <div class="col-sm-8">
                                <select id="brandId" name="brandId" class="form-control" placeholder="所属企业">
                                    <option value="" selected="selected">请选择</option>
                                    <c:forEach items="${platformCarBrands}" var="carBrandInfo">
                                        <option value="${carBrandInfo.brandId}">${carBrandInfo.brandName}
                                        </option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">车辆型号：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="carType" name="carType">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">车牌号：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="carNo" name="carNo">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">车辆类型：</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="carNumberType" id="carNumberType">
                                    <option value="0">小车</option>
                                    <option value="1">中巴</option>
                                    <option value="2">货车</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">省-市-区：</label>
                            <div class="col-sm-2">
                                <select name="provinceId" id="provinceId"
                                        class="form-control chosen-select"
                                        style="width: 100%" onchange="addTenantCarNumber.getCity()">
                                    <option value="" selected="selected">--请选择--</option>
                                    <c:forEach items="${provinces}" var="province">
                                        <option value="${province.provinceId}">${province.provinceName}</option>
                                    </c:forEach>
                                </select>
                            </div>

                            <div class="col-sm-2">
                                <select name="cityId" id="cityId"
                                        class="form-control chosen-select"
                                        style="width: 100%" onchange="addTenantCarNumber.getArea()">
                                    <option value="" selected="selected">${pileGroup.joinCity.city}</option>
                                </select>
                            </div>

                            <div class="col-sm-2">
                                <select id="areaId" name="areaId" class="form-control" placeholder="市区">
                                    <option value="" selected="selected">${pileGroup.joinArea.area}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">续航里程：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="endurance" name="endurance">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">备注说明：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="remark" name="remark">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-3 col-sm-offset-8 text-right">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<script>
    addTenantCarNumber.init();
</script>
